#include<Windows.h>
#include<stdio.h>
#include<stdlib.h>
// bitcount 
#define BIT 24
#define WIDTH 200
#define HEIGHT 150 
BITMAPFILEHEADER bfh; 
BITMAPINFOHEADER bih;
int main(){
	char *p;
	FILE *f;
	p=(char*)malloc(WIDTH*HEIGHT*BIT/8);
	f=fopen("tt.bmp","wb");
	bfh.bfType=0x4d42;
	bih.biSize=40;
	bih.biHeight=HEIGHT;
	bih.biWidth=WIDTH;
	bih.biBitCount=BIT;//
	fwrite(&bfh,sizeof bfh,1,f);
	fwrite(&bih,sizeof bih,1,f);
	fwrite(p,WIDTH*HEIGHT*BIT/8,1,f);//writing random data
	printf("%d %d\n",sizeof bfh,sizeof bih);// file head must be 14+40
	fclose(f);
	return 0;
}
